package org.mics.cyy.backUser.request;

import java.io.Serializable;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;


/**
 * 登陆对象
 * @author mics
 * @date 2020年6月10日
 * @version  1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(description = "账号密码登录请求")
public class LoginRequest implements Serializable {
    /**
	 * 序列号
	 */
	private static final long serialVersionUID = -876041016151352865L;

	@Schema(description = "登录账号（必填）",required = true)
    @Size(min = 4, max = 32, message = "账号必须是4-32位")
    @NotBlank(message = "账号不能为空")
    @Pattern(regexp = "(^1(3|4|5|6|7|8|9)\\d{9}$|[\\w-]+(\\.[\\w-]+)*@([\\w-]+\\.)+\\w{2,14})",message = "账号格式不正确")
    private String account;

    @Schema(description = "登录密码（必填）",required = true)
    @Size(min = 8, max = 32, message = "密码长度为8-32位")
    @NotBlank(message = "登录密码不能为空")
    private String password;
    
}
